STEP 9:网的方向不对!让我们翻转网络。

  • 将存储"soccernet"的变量名称从sprite更改为net
  • 点击并拖出Flip Right Left
  • .flip_right_left()前面的名称从sprite更改为net以将其分配给网络!


To navigate the page using the TAB key, first press ESC to exit the code editor.

stage.set_axis(100) stage.create_grid_overlay(10, "grey") stage.set_background("soccerfield") ballx = -80 bally = random.randint(-100,100) # sprite = codesters.Sprite("image", x, y) ball = codesters.Sprite("soccerball", ballx, bally) netx = 90 nety = random.randint(-100,100) # sprite = codesters.Sprite("image", x, y) sprite = codesters.Sprite("soccernet", netx, nety)
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)